package demo.practice.competition;

public class P5780 {

    public static void main(String[] args) {
        P5780 p5780 = new P5780();
        boolean b = p5780.canBeIncreasing(new int[]{89,384,691,680,111,756});
        System.out.println(b);
    }

    public boolean canBeIncreasing(int[] nums) {
        int times = 0;
        for (int i = 0; i < nums.length - 1; i++) {
            if (nums[i] >= nums[i + 1]) {
                return canBeIncreasing(nums, i) || canBeIncreasing(nums, i + 1);
            }
        }
        return true;
    }


    public boolean canBeIncreasing(int[] nums, int bi) {
        for (int i = 0; i < nums.length - 1; i++) {
            if (i == bi - 1) {
                if (i + 2 < nums.length && nums[i] >= nums[i + 2])
                    return false;
                else
                    continue;
            } else if (i == bi) {
                continue;
            } else if (nums[i] >= nums[i + 1]) {
                return false;
            }
        }
        return true;
    }


}
